@use "../variables.scss" as *;

.sd-timer {
  z-index: 2;
  position: fixed;
  bottom: calc(var(--sd-timer-size) / 144 * 32);
  right: calcSize(1);
  background: white;
  width: var(--sd-timer-size);
  height: var(--sd-timer-size);
  margin-right: calc(var(--sd-timer-size) / 144 * 32);
  display: flex;
  border-radius: 100%;
  padding: calc(var(--sd-timer-size) / 144 * 8);
  box-shadow: $shadow-large, $shadow-medium;
  box-sizing: border-box;
}

.sd-timer--top {
  top: calc(var(--sd-timer-size) / 144 * 32);
  margin-top: calcSize(4);
  margin-bottom: calc(-1 * var(--sd-timer-size));
}

.sd-timer--bottom {
  bottom: calc(var(--sd-timer-size) / 144 * 32);
  margin-top: calc(var(--sd-timer-size) * (-1 - 32 / 144));
}

.sd-timer__progress {
  --sd-timer-stroke-background-color: var(--background-dim, #f3f3f3);
  --sd-timer-stroke-background-width: 2px;
  stroke-linecap: round;
  height: 100%;
  width: 100%;
  transform: rotate(-90deg);
  stroke: $primary;
  stroke-dashoffset: 0;
  fill: none;
  stroke-width: 4px;
}

.sd-timer__progress--animation {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.sd-timer__text-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: calcSize(1);
  color: $primary;
  font-weight: 700;
  font-size: calc(var(--sd-timer-size) / 144 * 32);
}

.sd-timer__text--major {
  color: $primary;
  font-weight: 700;
  font-size: calc(var(--sd-timer-size) / 144 * 32);
}

.sd-timer__text--minor {
  color: var(--lbr-timer-text-color-secondary, $foreground-dim-light);
  font-size: var(--lbr-font-default-size, calcFontSize(1));
  font-style: normal;
  font-weight: 600;
  line-height: var(--lbr-font-default-line-height, calcLineHeight(1.5));
  margin-top: calcSize(-0.5);
}